package com.starleague.battletech.command;

import com.starleague.battletech.controller.IBattletechContext;
import com.starleague.battletech.game.IBattletechTeam;
import com.starleague.battletech.game.dto.IBattletechTeamDto;

public abstract class AbstractTeamCommand
        extends AbstractBattletechCommand
{
    private final IBattletechTeamDto teamDto;

    protected AbstractTeamCommand(IBattletechTeamDto teamDto)
    {
        this.teamDto = teamDto;
    }

    protected <CONTEXT extends IBattletechContext> IBattletechTeam getTeam(CONTEXT context)
    {
        return context.resolveTeam(this.teamDto);
    }
}
